home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / ircii-2.8he / ircii-2 / help / WAIT < prev    next >
Encoding:
Text File  |  1995-01-07  |  2.6 KB  |  66 lines

  1. Usage: WAIT [-cmd] [%process] [<command> <do_command>]
  2.   There are several forms of this command.  The first, and best is:
  3.     WAIT -CMD command
  4.  
  5.   WAIT causes the command to be executed when server output
  6.   that hasn't yet arrived, finally arrives.  This allows you to
  7.   take a specific action immediately after receiving output from 
  8.   the server, or client.
  9.  
  10.   For example, the following alias:
  11.     ALIAS BACKWARDS wait -cmd echo hello there;echo hi there
  12.   will actually display "hi there" before "hello there", because
  13.   the "hello there" echo is not executed until a WAIT token is
  14.   received from the server.  If for instance you wanted to make
  15.   sure to execute some command after the completion of a TRACE
  16.   of your server, the format would be.
  17.     TRACE
  18.     WAIT -CMD command
  19.   Note: This doesn't work for commands that depend on another server to 
  20.   send you information. TRACE <remote server> for instance.
  21.  
  22.   The second form of the command is:
  23.     WAIT -CMD %process command
  24.   Where %process is a valid running processes id or name.  This is
  25.   used to cause IRCII to execute the command after the process has
  26.   exited.  If the given process doesn't exist, return is immediate.
  27.   Here is an example of it's use:
  28.     alias uptime {
  29.       exec -name uptime uptime
  30.       wait %uptime -cmd echo The time is $uptime
  31.     }
  32.     alias dotime uptime
  33.     on ^exec uptime assign uptime $1
  34.   When dotime is called, a request will be sent to get the uptime.
  35.   The ON EXEC will catch the time and assign it to the variable 
  36.   'uptime' at the same time that the alias is at the 'wait %uptime'
  37.   stage, when the process exits, WAIT will continue and execute 
  38.   echo The time is $uptime, where '$uptime' has been set already.
  39.  
  40.   If you are echoing output to the screen from within the WAIT -CMD
  41.   form, it is probably a good idea to record the current window
  42.   and use XECHO -WINDOW to ensure that output goes where it should.
  43.  
  44.   The last form of WAIT is no longer recommended.  It can be 
  45.   used in the form of
  46.     WAIT
  47.   or
  48.     WAIT %process
  49.  
  50.   This suspends he client until the server has finished output, and 
  51.   has innumerable problems, among them being:
  52.  
  53.   - If one WAIT is executed while another is pending,
  54.     both will be registered as satisfied when the first
  55.     returns. A warning is now issued when this happens.
  56.  
  57.   - If you are in a prompted input sequence (such as oper
  58.     password, confirmation prompts, and $".." input),
  59.     results can be unpredictable.
  60.  
  61.   - It is not consistant with the message driven programming
  62.     model which exists in ircII.
  63.  
  64.   With multi window enhancements the problems with WAIT become even
  65.   more prohibitive, unless used in the -CMD form.
  66.